package com.sprucetec.live.service.impl;

import com.sprucetec.live.entity.LiveAnchor;
import com.sprucetec.live.entity.LiveOperateLog;
import com.sprucetec.live.enums.DeleteStatusEnum;
import com.sprucetec.live.mapper.LiveOperateLogMapper;
import com.sprucetec.live.service.LiveOperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author chenkai
 * @date 2020/4/13 5:47 下午
 * @description:
 */
@Slf4j
@Service("liveOperateLogService")
public class LiveOperateLogServiceImpl implements LiveOperateLogService {

    @Autowired
    private LiveOperateLogMapper liveOperateLogMapper;

    @Override
    public void insertOperateLog(LiveOperateLog liveOperateLog) {
        liveOperateLogMapper.insertSelective(liveOperateLog);
    }

    @Override
    public List<LiveOperateLog> getOperateLogList(LiveOperateLog liveOperateLog) {
        Example example = new Example(LiveOperateLog.class);
        example.createCriteria().andEqualTo("billNo", liveOperateLog.getBillNo());
        return liveOperateLogMapper.selectByExample(example);
    }
}
